package com.car.dal.dao.reception;

import java.util.List;

import com.car.bean.GridObj;
import com.car.bean.OrderObj;
import com.car.bean.PageObj;
import com.car.dal.dao.ibatis.IbatisCommonDao;
import com.car.dal.object.TgZhichu;
import com.car.util.Page;

public class ZhichuDaoImpl extends IbatisCommonDao<TgZhichu, Long> implements ZhichuDao {

	public GridObj GetList(TgZhichu zhichu, PageObj pageObj) {
		OrderObj order = new OrderObj();
		order.setDir("desc");
		order.setSort("id");
		return super.findByPage(zhichu, pageObj, order);
	}
	
	public Integer getZcCountListByType(TgZhichu zhichu) {
		return this.queryForInteger("getZcCountListByType", zhichu);
	}
	
	public List<TgZhichu> getZhichuListByType(TgZhichu zhichu , Page page) {
		zhichu.setFirstrownum(page.getFirstrownum());
		zhichu.setPagesize(page.getPagesize());
		List<TgZhichu> list=this.queryForEntityList(TgZhichu.class,"getZhichuListByType", zhichu);
		return list;
	}
}
